using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using GestaoEventos.Interface;
using GestaoEventos.DataAccess;

namespace GestaoEventos.Business
{
       public class B_Campus
       {
           #region Atributos

           private I_Campus _ICampus;

           #endregion

           #region Propriedades

           public I_Campus ICampus
           {
               get { return _ICampus; }
               set { _ICampus = value; }
           }

           #endregion

           #region Construtores

           public B_Campus()
           {
               try
               {
                   _ICampus = new I_Campus();
               }
               catch(Exception e)
               {
                   throw e;
               }
           }
           public B_Campus(I_Campus IObj)
           {
               try
               {
                   _ICampus = IObj;
               }
               catch(Exception e)
               {
                   throw e;
               }
           }

           #endregion

           #region Métodos Publicos

           public int Inserir()
           {
               try
               {
                   D_Campus DCampus = new D_Campus();
                   return DCampus.Insert(_ICampus);
               }
               catch(Exception e)
               {
                   throw e;
               }
           }
           public int Atualizar()
           {
               try
               {
                   D_Campus DCampus = new D_Campus();
                   return DCampus.Update(_ICampus);
               }
               catch(Exception e)
               {
                   throw e;
               }
           }
           public int Deletar()
           {
               try
               {
                   D_Campus DCampus = new D_Campus();
                   return DCampus.Delete(_ICampus);
               }
               catch(Exception e)
               {
                   throw e;
               }
           }
           public ArrayList Selecionar()
           {
               try
               {
                   D_Campus DCampus = new D_Campus();
                   return DCampus.Select(_ICampus);
               }
               catch(Exception e)
               {
                   throw e;
               }
           }

           #endregion
       }
}

